ATHLET Framework for Embedding/Extending: An Efficient, Flexible & Easy-to-use Python Framework to a Large FORTRAN Code
نویسندگان
چکیده
— Over the years, large scientific code packages have been successfully developed using FORTRAN. Today, maintaining and extending these codes is a challenging task and often forbids several possibilities. Rewriting legacy code packages is almost prohibitive due to lacking resources and inertia against changing functional codes. One way of tackling these challenges is to integrate scripting languages into existing codes thereby retaining performance-critical kernels in FORTRAN and add an interface to a flexible, dynamically typed scripting language. Amongst the scripting languages, Python stands as a forerunner, especially due to the availability of scientific packages such as NUMPY and SciPy. In this project, an interface to Python is developed for a thermal-hydraulic simulation tool ATHLET, which is mainly used for nuclear reactor safety problems. The FORTRAN to Python interface generator tool (f2py) is used in an innovative way to have access to FORTRAN subroutines and module variables from Python and vice versa. Standard interfaces for three purposes have been developed. The interfaces allow for processing the simulation results during the simulation, calling Python subroutines within a simulation time step and coupling external simulations with ATHLET. The result of the project is an easy-to-use Python Framework to a large FORTRAN code which is very low on overhead, provides standard interfaces and requires very little changes to the original code. This framework allows the user to extend the functionality of ATHLET, by writing new modules in Python and coupling with external simulation codes, without having to deal with the rigours of FORTRAN programming.
منابع مشابه
A Python Framework for Verifying Codes for Numerical Solutions of Partial Differential Equations
We present a Python framework for applying the method of manufactured solutions (MMS) to verify software for solving partial differential equations. The user can, interactively or in a script, specify mathematical expressions for the solution and the PDE, and the framework modifies the simulator according to the new analytical solution. The verification framework applies to C, C++, and Fortran ...
متن کاملFortran to Python Interface Generator with an Application to Aerospace Engineering
FPIG — Fortran to Python Interface Generator — is a tool for generating Python C/API extension modules that interface Fortran 77/90/95 codes with Python. This tool automates the process of interface generation by scanning the Fortran source code to determine the signatures of Fortran routines and creating a Python C/API module that contains the corresponding interface functions. FPIG also attem...
متن کاملPrograming Using High Level Design With Python and FORTRAN: A Study Case in Astrophysics
In this work, we present a short review about the high level design methodology (HLDM), that is based on the use of very high level (VHL) programing language as main, and the use of the intermediate level (IL) language only for the critical processing time. The languages used are Python (VHL) and FORTRAN (IL). Moreover, this methodology, making use of the oriented object programing (OOP), permi...
متن کاملpyOpt: A Python-Based Object-Oriented Framework for Nonlinear Constrained Optimization
We present pyOpt, an object-oriented framework for formulating and solving nonlinear constrained optimization problems in an efficient, reusable and portable manner. The framework uses object-oriented concepts, such as class inheritance and operator overloading, to maintain a distinct separation between the problem formulation and the optimization approach used to solve the problem. This create...
متن کاملCUDA-level Performance with Python-level Productivity for Gaussian Mixture Model Applications
Typically, scientists with computational needs prefer to use high-level languages such as Python or MATLAB; however, large computationally-intensive problems must eventually be recoded in a low level language such as C or Fortran by expert programmers in order to achieve sufficient performance. In addition, multiple strategies may exist for mapping a problem onto parallel hardware; unless the h...
متن کامل